package com.zpeb.pdd.config;

import com.zpeb.pdd.mapper.ChatMapper;
import com.zpeb.pdd.mapper.FriendMapper;
import com.zpeb.pdd.ws.WebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName gongchengshijian3zhongjiban
 * @Description: TODO
 * @date ${DAT}18:51
 */

@Configuration
public class WebSocketConfig {
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
    @Autowired
    public void getChatMapper(ChatMapper chatMapper){
        WebSocket.chatMapper=chatMapper;
    }
    @Autowired
    public void getFriendMapper(FriendMapper friendMapper){
        WebSocket.friendMapper=friendMapper;
    }
}
